<div class="view">
    <?php
    $array_hari = array(1=>"Senin","Selasa","Rabu","Kamis","Jumat", "Sabtu","Minggu");
    if (isset($data)){
        $options = array(
            'success' => "js:function(data, textStatus, XMLHttpRequest) {
            console.log(data);
        }"
        );

        echo '<table id="detail-profile" class="detail-view table">';

        foreach($data as $key => $values){

            //echo '<pre>';
            //print_r($values['hari']);
            //echo '</pre>';


            $id = $values['id'];
            echo '<tr><th>'.$array_hari[$values['hari']].'</th>';
            echo '<td>'.$values['start'].' - '.$values['end'].'</td>';
            echo '<td>'.$values->layanan->nama.'</td>';


            echo '<td>'.CHtml::ajaxLink('Delete', CHtml::normalizeUrl(array('TrMDokter/deleteJadwal&id='.$values['id'])),array(
                        'success' => "js:function(data, textStatus, XMLHttpRequest) {
                        location.reload();
                    }"
                    ),
                    array('confirm'=>"Anda Yakin ingin menghapus data ini?")).'</td><tr>';

        }
        echo '</table>';
    };
    ?>
    <br />

</div>
